<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>InfCommunicationFactory</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.0">
<link rel="home" href="index.html" title="libinfinity-0.4 Reference Manual">
<link rel="up" href="ch06.html" title="Network abstraction">
<link rel="prev" href="InfCommunicationJoinedGroup.html" title="InfCommunicationJoinedGroup">
<link rel="next" href="InfCommunicationMethod.html" title="InfCommunicationMethod">
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="InfCommunicationJoinedGroup.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch06.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libinfinity-0.4 Reference Manual</th>
<td><a accesskey="n" href="InfCommunicationMethod.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#InfCommunicationFactory.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#InfCommunicationFactory.description" class="shortcut">Description</a>
                   | 
                  <a href="#InfCommunicationFactory.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#InfCommunicationFactory.prerequisites" class="shortcut">Prerequisites</a>
                   | 
                  <a href="#InfCommunicationFactory.implementations" class="shortcut">Known Implementations</a>
</td></tr>
</table>
<div class="refentry" title="InfCommunicationFactory">
<a name="InfCommunicationFactory"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="InfCommunicationFactory.top_of_page"></a>InfCommunicationFactory</span></h2>
<p>InfCommunicationFactory — Creation of communication methods</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1" title="Stability Level">
<a name="InfCommunicationFactory.stability-level"></a><h2>Stability Level</h2>
Unstable, unless otherwise indicated
</div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="InfCommunicationFactory.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libinfinity/communication/inf-communication-factory.h&gt;

                    <a class="link" href="InfCommunicationFactory.html#InfCommunicationFactory-struct" title="InfCommunicationFactory">InfCommunicationFactory</a>;
                    <a class="link" href="InfCommunicationFactory.html#InfCommunicationFactoryIface" title="InfCommunicationFactoryIface">InfCommunicationFactoryIface</a>;
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="InfCommunicationFactory.html#inf-communication-factory-supports-method" title="inf_communication_factory_supports_method ()">inf_communication_factory_supports_method</a>
                                                        (<em class="parameter"><code><a class="link" href="InfCommunicationFactory.html" title="InfCommunicationFactory"><span class="type">InfCommunicationFactory</span></a> *factory</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *network</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>);
<a class="link" href="InfCommunicationMethod.html" title="InfCommunicationMethod"><span class="returnvalue">InfCommunicationMethod</span></a> * <a class="link" href="InfCommunicationFactory.html#inf-communication-factory-instantiate" title="inf_communication_factory_instantiate ()">inf_communication_factory_instantiate</a>
                                                        (<em class="parameter"><code><a class="link" href="InfCommunicationFactory.html" title="InfCommunicationFactory"><span class="type">InfCommunicationFactory</span></a> *factory</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *network</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfCommunicationRegistry.html" title="InfCommunicationRegistry"><span class="type">InfCommunicationRegistry</span></a> *registry</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a> *group</code></em>);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="InfCommunicationFactory.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GInterface
   +----InfCommunicationFactory
</pre>
</div>
<div class="refsect1" title="Prerequisites">
<a name="InfCommunicationFactory.prerequisites"></a><h2>Prerequisites</h2>
<p>
InfCommunicationFactory requires
 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
</div>
<div class="refsect1" title="Known Implementations">
<a name="InfCommunicationFactory.implementations"></a><h2>Known Implementations</h2>
<p>
InfCommunicationFactory is implemented by
 <a class="link" href="InfCommunicationCentralFactory.html" title="InfCommunicationCentralFactory">InfCommunicationCentralFactory</a>.</p>
</div>
<div class="refsect1" title="Description">
<a name="InfCommunicationFactory.description"></a><h2>Description</h2>
<p>
A <a class="link" href="InfCommunicationFactory.html" title="InfCommunicationFactory"><span class="type">InfCommunicationFactory</span></a> is used by the communication manager to create
<a class="link" href="InfCommunicationMethod.html" title="InfCommunicationMethod"><span class="type">InfCommunicationMethod</span></a>s. All a factory has to do is to tell
whether it supports a specific network and method name combination, and
create a corresponding <a class="link" href="InfCommunicationMethod.html" title="InfCommunicationMethod"><span class="type">InfCommunicationMethod</span></a> if it does.
</p>
<p>
<a class="link" href="InfCommunicationFactory.html" title="InfCommunicationFactory"><span class="type">InfCommunicationFactory</span></a>s are added to a communication manager via
<a class="link" href="InfCommunicationManager.html#inf-communication-manager-add-factory" title="inf_communication_manager_add_factory ()"><code class="function">inf_communication_manager_add_factory()</code></a>. The communication manager will
automatically use the factory if it needs to create a method it supports.
</p>
</div>
<div class="refsect1" title="Details">
<a name="InfCommunicationFactory.details"></a><h2>Details</h2>
<div class="refsect2" title="InfCommunicationFactory">
<a name="InfCommunicationFactory-struct"></a><h3>InfCommunicationFactory</h3>
<pre class="programlisting">typedef struct _InfCommunicationFactory InfCommunicationFactory;</pre>
<p>
<a class="link" href="InfCommunicationFactory.html" title="InfCommunicationFactory"><span class="type">InfCommunicationFactory</span></a> is an opaque data type. You should only access it
via the public API functions.
</p>
</div>
<hr>
<div class="refsect2" title="InfCommunicationFactoryIface">
<a name="InfCommunicationFactoryIface"></a><h3>InfCommunicationFactoryIface</h3>
<pre class="programlisting">typedef struct {
} InfCommunicationFactoryIface;
</pre>
<p>
The virtual methods of <a class="link" href="InfCommunicationFactory.html" title="InfCommunicationFactory"><span class="type">InfCommunicationFactory</span></a>. These handle instantiating
a <a class="link" href="InfCommunicationMethod.html" title="InfCommunicationMethod"><span class="type">InfCommunicationMethod</span></a> for a <a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_communication_factory_supports_method ()">
<a name="inf-communication-factory-supports-method"></a><h3>inf_communication_factory_supports_method ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            inf_communication_factory_supports_method
                                                        (<em class="parameter"><code><a class="link" href="InfCommunicationFactory.html" title="InfCommunicationFactory"><span class="type">InfCommunicationFactory</span></a> *factory</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *network</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>);</pre>
<p>
Returns whether <em class="parameter"><code>factory</code></em> supports creating methods that implement
<em class="parameter"><code>method_name</code></em> as communication method for connections on <em class="parameter"><code>network</code></em>
(see <a class="link" href="InfXmlConnection.html#InfXmlConnection--network" title='The "network" property'><span class="type">"network"</span></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td>
<td>A <a class="link" href="InfCommunicationFactory.html" title="InfCommunicationFactory"><span class="type">InfCommunicationFactory</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>network</code></em> :</span></p></td>
<td>A network specifier, such as "tcp/ip" or "jabber".
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>method_name</code></em> :</span></p></td>
<td>A method identifier, such as "central" or "groupchat".
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Whether <em class="parameter"><code>factory</code></em> supports the given network and method name.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_communication_factory_instantiate ()">
<a name="inf-communication-factory-instantiate"></a><h3>inf_communication_factory_instantiate ()</h3>
<pre class="programlisting"><a class="link" href="InfCommunicationMethod.html" title="InfCommunicationMethod"><span class="returnvalue">InfCommunicationMethod</span></a> * inf_communication_factory_instantiate
                                                        (<em class="parameter"><code><a class="link" href="InfCommunicationFactory.html" title="InfCommunicationFactory"><span class="type">InfCommunicationFactory</span></a> *factory</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *network</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfCommunicationRegistry.html" title="InfCommunicationRegistry"><span class="type">InfCommunicationRegistry</span></a> *registry</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a> *group</code></em>);</pre>
<p>
Creates a new <a class="link" href="InfCommunicationMethod.html" title="InfCommunicationMethod"><span class="type">InfCommunicationMethod</span></a> for <em class="parameter"><code>network</code></em> and <em class="parameter"><code>method_name</code></em>. The
factory needs to support that method, see
<a class="link" href="InfCommunicationFactory.html#inf-communication-factory-supports-method" title="inf_communication_factory_supports_method ()"><code class="function">inf_communication_factory_supports_method()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td>
<td>A <a class="link" href="InfCommunicationFactory.html" title="InfCommunicationFactory"><span class="type">InfCommunicationFactory</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>network</code></em> :</span></p></td>
<td>A network specifier, such as "tcp/ip" or "jabber".
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>method_name</code></em> :</span></p></td>
<td>A method identifier, such as "central" or "groupchat".
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>registry</code></em> :</span></p></td>
<td>A <a class="link" href="InfCommunicationRegistry.html" title="InfCommunicationRegistry"><span class="type">InfCommunicationRegistry</span></a> at which the created method can
register connections.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td>
<td>The <a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a> for which to create the method.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A new <a class="link" href="InfCommunicationMethod.html" title="InfCommunicationMethod"><span class="type">InfCommunicationMethod</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="See Also">
<a name="InfCommunicationFactory.see-also"></a><h2>See Also</h2>
<a class="link" href="InfCommunicationManager.html" title="InfCommunicationManager"><span class="type">InfCommunicationManager</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.15</div>
</body>
</html>